﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SuperSerialization.Tree;

namespace SuperSerialization.TreeVisitor
{
    /// <summary>
    /// A base abstract class for document node tree visitors.
    /// </summary>
    abstract class AbstractVisitor
    {
        /// <summary>
        /// Visits a field node.
        /// </summary>
        /// <param name="value">A field node.</param>
        public abstract void VisitField(FieldNode value);

        /// <summary>
        /// Visits an object node.
        /// </summary>
        /// <param name="obj">An object node.</param>
        public abstract void VisitObject(ObjectNode obj);

        /// <summary>
        /// Visits a literal node.
        /// </summary>
        /// <param name="literal">A literal node.</param>
        public abstract void VisitLiteral(LiteralNode literal);

        /// <summary>
        /// Visits an array node.
        /// </summary>
        /// <param name="array">An array node.</param>
        public abstract void VisitArray(ArrayNode array);

        /// <summary>
        /// Visits the base node.
        /// </summary>
        /// <param name="node">The base node.</param>
        public abstract void VisitBase(BaseNode node);

        /// <summary>
        /// Visits a namespace node.
        /// </summary>
        /// <param name="node">A namespace node.</param>
        public abstract void VisitNamespace(NamespaceNode node);
    }
}
